
from socket import * 
import time

#datHex="150034c71d2b49800c00290016661d4a9c3c0b330e8e254e1e0b000bb9065a1f0008076bf4060101060002e12038353530c30c40"
#datHex="150034c71d2b49800c00290016661d4a9c3c0b330e8e254e1e0b000bb9065a1f0008076be8060101060002e12038353530c30c40"
#lost time
#datHex="15002dc7112b49800c00290016661d4a9c3c0b330e8e254e1e0b000bb9f4060101060002e12038353530c30c40"
#lost targetaddress
#datHex="150031c70d2b49800c00290016661d4a9c3c0b330e8e254e1e0b065a1f0008076bf4060101060002e12038353530c30c40"
#lost quality
#datHex="150033c71d0b49800c00290016661d4a9c3c0b330e8e254e1e0b000bb9065a1f0008076b060101060002e12038353530c30c40"
#lost sacsic
#datHex="150032471d2b4980290016661d4a9c3c0b330e8e254e1e0b000bb9065a1f0008076bf4060101060002e12038353530c30c40"
#lost report
#datHex="150032871d2b49800c0016661d4a9c3c0b330e8e254e1e0b000bb9065a1f0008076bf4060101060002e12038353530c30c40"

#datHex="150032471d2b498290016661d4a9c3c0b330e8e254e1e0b000bb9065a1f0008076bf4060101060002e12038353530c30c40"
#quality all   nucp =8 nicb=1 sil=2 nacp=4 pic=5  quality=f1c90150  MOPS vn=0
#datHex="150038c71d3b49800c00290016661d4a9c3c0b330e8e254e1e0b000bb9065a1f0008076bf1c9015000060101060002e12038353530c30c40"
#quality all   nucp/nic =8 nicb=1 sil=2 nacp=4 pic=5  quality=f1c90150  MOPS vn=1
#datHex="150038c71d3b49800c00290016661d4a9c3c0b330e8e254e1e0b000bb9065a1f0008076bf1c9015008060101060002e12038353530c30c40"
#quality all   nucp/nic =8 nicb=1 sil=2 nacp=4 pic=6  quality=f1c90150  MOPS vn=1
#datHex="150038c71d3b49800c00290016661d4a9c3c0b330e8e254e1e0b000bb9065a1f0008076bf1c9016008060101060002e12038353530c30c40"
#quality all   nucp/nic =4 nicb=1 sil=2 nacp=4 pic=6  quality=f1c90150  MOPS vn=1
#datHex="150038c71d3b49800c00290016661d4a9c3c0b330e8e254e1e0b000bb9065a1f0008076be9c9016008060101060002e12038353530c30c40"
#quality all   nucp/nic =8 nicb=1 sil=2 nacp=3 pic=6  quality=f1c90150  MOPS vn=1
#datHex="150038c71d3b49800c00290016661d4a9c3c0b330e8e254e1e0b000bb9065a1f0008076bf1c7016008060101060002e12038353530c30c40"
#quality all   nucp/nic =8 nicb=1 sil=0 nacp=4 pic=6  quality=f1c90150  MOPS vn=1
#datHex="150038c71d3b49800c00290016661d4a9c3c0b330e8e254e1e0b000bb9065a1f0008076bf1a9016008060101060002e12038353530c30c40"

#quality all   nucp/nic =8 nicb=0 sil=2 nacp=4 pic=5  quality=f1c90150  MOPS vn=1 
#datHex="150034c71d2b49800c0f2900149e024c1df40a4f0135260efa03000bb935408e0004e103f486018189000375ec51353530c30c40"
#Lost /040 & /042
datHex="030330003eeff7021658177000a0046405046003c1780c2c0d30f8d77ce003beb00030aa000040c35a3330bfe000608018533be014e950064b088d853b4022f5"
#datHex="0303300046ffff021658000177b085af7b6d046405046003c1780c2c0d30f8d77ce003beb00030aa000040c35a3330bfe000608018533be014e950064b077cbd94088d853b4022f5"


#lost hieght
#datHex="150038c71d3b49800c00290016661d4a9c3c0b330e8e254e1e0b000bb9065a1f0008076bf149ff5008060101060002e12038353530c30c40"
#too high
#="0103010017f78400ffa000d315b33cb006a9ba5c0d26dfff40"


HOST ='233.1.21.1'  
PORT =56019
ADDR = (HOST, PORT)  
udpClient = socket(AF_INET, SOCK_DGRAM)  
#udpClient.bind(("192.168.5.50",0))
arry = bytearray()
def mySplit(str):
    for i in range(int(len(str)/2)):    
        arry.append(int(str[2*i:2*(i+1)],16))
        
mySplit(datHex)
#print(arry)
while(True):
    print(datHex.strip())
    udpClient.sendto(arry,ADDR)
    time.sleep(0.125)

udpClient.close()
